package es.abredatos.energyes;

import static org.junit.Assert.*;
import groovy.util.GroovyTestCase;

import org.junit.Test;

class ChartServiceTest extends GroovyTestCase{
	
	def chartService
	
	void testReturnProductionsToChart() {
		
		def productions = []
		def region = Region.findByCode('EXTREMADURA')
		def provinces = Province.findAllByRegion(region)
		def years = [2009,2009]
		def months = [3,11]
		productions = chartService.returnProductionsToChart(years, months, Energy.NUCLEAR, provinces)
		assert productions.size()>0
	}

}
